package com.union.core.doc.model;

import java.util.Date;
import java.util.List;

import com.hnjowe.util.ComUtil;
import com.union.core.doc.pojo.OfficialDocPojo;
import com.union.core.model.BaseModel;
import com.union.core.organization.model.OrganizationManager;
import com.union.core.sys.model.SysManager;

/**
 * 公文表
 * @author leochen
 *
 */
public class OfficialDoc extends BaseModel{
	private String doc_no;	   		 //公文编号
	private String doc_type;			 //文件类别
	private String belong_section;	 //所属单位
	private String confidential_level;//密级
	private String title;            //公文标题                                                    
	private String content;          //公文内容                   
	private String key_word; 	     //主题词
	private Date send_time;          //发送时间                                                    
	private String emergency_level;  //紧急程度                                                    
	private String template_id;        //模板ID                                                        
	private long seal_id;            //公章ID                                                        
	private String flow_flag = "0";        //流转标志：0-草稿，1-已下发（默认0）
	private boolean effect_flag = true;     //有效标志：1-有效，0-删除（默认1）                 
	private long create_userid;      //创建人                                                       
	private Date create_time;        //创建时间                                                    
	private long modify_userid;      //修改人                                                       
	private Date modify_time;        //修改时间   
	private String receive_section; //接收单位ID，多个ID逗号分隔，用于发文时暂存草稿时用
	private Date opt_send_time;
	private SysManager createUser;
	private OrganizationManager orgManager;
	private String doc_type_name;
	private String emergency_level_name;
	private String confidential_level_name;
	private String flow_flag_name;
	/**
	 * 附件列表
	 */
	private List<DocAttachment> docAttachList;
	private String doc_file_name;//红头文件名称
	private String doc_file_path;//红头文件路径
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getSend_time() {
		return send_time;
	}
	public void setSend_time(Date send_time) {
		this.send_time = send_time;
	}
	public String getEmergency_level() {
		return emergency_level;
	}
	public void setEmergency_level(String emergency_level) {
		this.emergency_level = emergency_level;
	}
	public String getTemplate_id() {
		return template_id;
	}
	public void setTemplate_id(String template_id) {
		this.template_id = template_id;
	}
	public long getSeal_id() {
		return seal_id;
	}
	public void setSeal_id(long seal_id) {
		this.seal_id = seal_id;
	}
	public String getFlow_flag() {
		return flow_flag;
	}
	public void setFlow_flag(String flow_flag) {
		this.flow_flag = flow_flag;
	}
	public boolean isEffect_flag() {
		return effect_flag;
	}
	public void setEffect_flag(boolean effect_flag) {
		this.effect_flag = effect_flag;
	}
	public long getCreate_userid() {
		return create_userid;
	}
	public void setCreate_userid(long create_userid) {
		this.create_userid = create_userid;
	}
	public Date getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	public long getModify_userid() {
		return modify_userid;
	}
	public void setModify_userid(long modify_userid) {
		this.modify_userid = modify_userid;
	}
	public Date getModify_time() {
		return modify_time;
	}
	public void setModify_time(Date modify_time) {
		this.modify_time = modify_time;
	}
	public String getDoc_no() {
		return doc_no;
	}
	public void setDoc_no(String doc_no) {
		this.doc_no = doc_no;
	}
	public String getDoc_type() {
		return doc_type;
	}
	public void setDoc_type(String doc_type) {
		this.doc_type = doc_type;
	}
	public String getBelong_section() {
		return belong_section;
	}
	public void setBelong_section(String belong_section) {
		this.belong_section = belong_section;
	}
	public String getConfidential_level() {
		return confidential_level;
	}
	public void setConfidential_level(String confidential_level) {
		this.confidential_level = confidential_level;
	}
	public String getKey_word() {
		return key_word;
	}
	public void setKey_word(String key_word) {
		this.key_word = key_word;
	}
	
	public void copy(OfficialDocPojo officialDocPojo){
		this.doc_no = officialDocPojo.getDoc_no();	   		 //公文编号
		this.doc_type = officialDocPojo.getDoc_type();			 //文件类别
		this.belong_section = officialDocPojo.getBelong_section();	 //所属单位
		this.confidential_level = officialDocPojo.getConfidential_level();//密级
		this.title = officialDocPojo.getTitle();            //公文标题                                                    
		this.content = officialDocPojo.getContent();          //公文内容                   
		this.key_word = officialDocPojo.getKey_word(); 	     //主题词
		this.send_time = officialDocPojo.getSend_time();          //发送时间                                                    
		this.emergency_level = officialDocPojo.getEmergency_level();  //紧急程度                                                    
		this.template_id = officialDocPojo.getTemplate_id();        //模板ID                                                        
		this.seal_id = officialDocPojo.getSeal_id();            //公章ID      
		this.receive_section = officialDocPojo.getReceive_section();
	}
	public String getReceive_section() {
		return receive_section;
	}
	public void setReceive_section(String receive_section) {
		this.receive_section = receive_section;
	}
	public Date getOpt_send_time() {
		return opt_send_time;
	}
	public void setOpt_send_time(Date opt_send_time) {
		this.opt_send_time = opt_send_time;
	}
	public SysManager getCreateUser() {
		if(createUser == null && create_userid > 0){
			createUser = ComUtil.getSysManagerService().querySysManager((int)create_userid);
		}
		return createUser;
	}
	public void setCreateUser(SysManager createUser) {
		this.createUser = createUser;
	}
	public OrganizationManager getOrgManager() {
		if(orgManager == null){
			orgManager = new OrganizationManager();
		}
		return orgManager;
	}
	public void setOrgManager(OrganizationManager orgManager) {
		this.orgManager = orgManager;
	}
	public String getDoc_type_name() {
		return doc_type_name;
	}
	public void setDoc_type_name(String doc_type_name) {
		this.doc_type_name = doc_type_name;
	}
	public String getEmergency_level_name() {
		return emergency_level_name;
	}
	public void setEmergency_level_name(String emergency_level_name) {
		this.emergency_level_name = emergency_level_name;
	}
	public String getConfidential_level_name() {
		return confidential_level_name;
	}
	public void setConfidential_level_name(String confidential_level_name) {
		this.confidential_level_name = confidential_level_name;
	}
	public String getFlow_flag_name() {
		return flow_flag_name;
	}
	public void setFlow_flag_name(String flow_flag_name) {
		this.flow_flag_name = flow_flag_name;
	}
	public List<DocAttachment> getDocAttachList() {
		return docAttachList;
	}
	public void setDocAttachList(List<DocAttachment> docAttachList) {
		this.docAttachList = docAttachList;
	}
	public String getDoc_file_name() {
		return doc_file_name;
	}
	public void setDoc_file_name(String doc_file_name) {
		this.doc_file_name = doc_file_name;
	}
	public String getDoc_file_path() {
		return doc_file_path;
	}
	public void setDoc_file_path(String doc_file_path) {
		this.doc_file_path = doc_file_path;
	}
}
